package com.qf.service;

import com.github.pagehelper.PageInfo;
import com.qf.entity.Annunciate;
import org.apache.ibatis.annotations.Param;

import javax.servlet.http.HttpSession;
import java.util.List;

/**
 * 通告管理
 */
public interface AnnounceService {

    /**
     * 分页封装
     * @param page
     * @param realName
     * @param publishTimeBegin
     * @param publishTimeOver
     * @return
     */
    PageInfo<Annunciate> findAllAnnounce(Integer page, String realName, String publishTimeBegin, String publishTimeOver);

    /**
     * 修改状态
     * @return
     */
    Integer updataStatus(Integer anId, Integer status, HttpSession session);

    /**
     * 批量删除
     * @param arr
     * @return
     */
    Integer bathDelete(int[] arr);

    /**
     * 添加
     * @param annunciate
     * @return
     */
    Integer addAnnunciate(Annunciate annunciate);

    /**
     * 查看
     * @param anId
     * @return
     */
    Annunciate findAnnunciate(Integer anId);

    /**
     * 修改
     * @param annunciate
     * @return
     */
    Integer updateAnnunciate(Annunciate annunciate);

    /**
     * in查询
     * @param arr
     * @return
     */
    List<Annunciate> findAnnunciateByArr(int[] arr);



    //根据状态值来查询通知信息
    PageInfo<Annunciate> findAllInfoByStatus(Integer pageNum, Integer size, String annName,String startTimes,String endTimes);

    //根据anIds查询用户信息
    List<Annunciate> getExcle(Integer[] anIds);

    //根据id查询公告信息
    Annunciate findInfoByAnId(Integer anId);
}
